package com.jt.safe.ui.adpter

import android.view.View
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.jt.safe.R
import com.jt.safe.extension.setVisible

class MessageSchoolAdapter :
    BaseQuickAdapter<String, BaseViewHolder>(R.layout.message_school_item) {
    override fun convert(helper: BaseViewHolder, item: String?) {
        val isProgress = helper.getView<TextView>(R.id.isProgress)
        val isEnd = helper.getView<TextView>(R.id.isEnd)
        if (helper.adapterPosition % 2 == 1) {
            isProgress.visibility=View.GONE
            isEnd.visibility=View.VISIBLE
        } else {
            isProgress.visibility=View.VISIBLE
            isEnd.visibility=View.GONE
        }
    }
}